import { GameContext } from "@sapi-game/gameContext";
import { PlayerGroupSet } from "@sapi-game/gamePlayer/groupSet";
import { PlayerGroup } from "@sapi-game/gamePlayer/playerGroup";
import { ElevatorCatConfig } from "./configManager";
import { ElevatorUtils } from "./func";
import { ElevatorCatPlayer } from "./player";

export class ElevatorCatContext extends GameContext {
    readonly FloorHeight = 6;
    readonly bellPos = { x: 367, y: -57, z: 76 };
    readonly utils = new ElevatorUtils(this.FloorHeight, -60);

    readonly cat: PlayerGroup<ElevatorCatPlayer>;
    readonly mouse: PlayerGroup<ElevatorCatPlayer>;
    readonly group: PlayerGroupSet<ElevatorCatPlayer>;
    readonly config: ElevatorCatConfig;

    constructor(
        cat: PlayerGroup<ElevatorCatPlayer>,
        mouse: PlayerGroup<ElevatorCatPlayer>,
        config: ElevatorCatConfig
    ) {
        super();
        this.cat = cat;
        this.mouse = mouse;
        this.config = config;
        this.group = new PlayerGroupSet([cat, mouse]);
    }
}
